<!DOCTYPE html>
<html xmlns=http://www.w3.org/1999/xhtml xmlns:bd=http://www.baidu.com/2010/xbdml>
<head>
    <meta http-equiv="Content-Type" content="text/html" charset="utf-8">
    <title>添加建筑</title>
    <Link Rel="SHORTCUT ICON" href="/pc/layout/img/logo1.png">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    
    <link rel="stylesheet" href="/pc/layui/css/layui.css" media="all" />
    <link rel="stylesheet" href="/pc/layout/css/font_eolqem241z66flxr.css" media="all" />
    <link rel="stylesheet" href="/pc/layout/css/main.css" media="all" />
    <script type="text/javascript" src="http://api.map.baidu.com/getscript?v=2.0&ak=U25vSd26q851c
	uSCjMCXuFkYYemWxvRs&services=&t=20170707103901"></script>

</head>
<body class="childrenBody">
<div class="row">
    <div class="sysNotice col">
        <form class="layui-form" style="margin-left: 10em;">
            {{ csrf_field() }}
            <div class="layui-form-item">
                <label class="layui-form-label">所属区域</label>
                <div class="layui-input-block"  style="width: 25em;position: relative;">
                    <select id="area_id" lay-verify="required" lay-search="">
                        <option value="">请选择区域</option>
                        @if(!empty($areaInfo))
                            @foreach($areaInfo as $val)
                                <option value="{{$val['id']}}">{{$val['name']}}</option>
                            @endforeach
                        @endif
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">建筑名称</label>
                <div class="layui-input-block" style="width: 25em;">
                    <input type="text" class="layui-input" name="buildingName" lay-verify="required" placeholder="请输入建筑名称">
                </div>
            </div>

           

            <div class="layui-form-item"  style="display: none">
                <label class="layui-form-label">经度</label>
                <div class="layui-input-block" style="width: 25em;">
                    <input type ="text" name="long" class="layui-input" placeholder="113.64964385" style="background-color: #f1f1f1">
                </div>
            </div>
            <div class="layui-form-item" style="display: none" >
                <label class="layui-form-label">维度</label>
                <div class="layui-input-block" style="width: 25em;">
                    <input type ="text" name="lat" class="layui-input" placeholder="34.75661006" style="background-color: #f1f1f1">
                </div>
            </div>
            <div class="layui-form-item" style="margin-top: 4.9em;">
                <label class="layui-form-label">楼层数量</label>
                <div class="layui-input-block" style="width: 25em;">
                    <input type ="text" id="input"    name="numfloor" class="layui-input" max="40" min="1" placeholder="请输入1--40以内的数字" style="background-color: #f1f1f1">

                </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">房间数量</label>
                    <div class="layui-input-block" style="width: 25em;">
                        <input type ="text" id="roo" name="numroom" class="layui-input" max="20" min="1" placeholder="请输入1--20以内的数字" style="background-color: #f1f1f1">
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button class="layui-btn" lay-submit="" lay-filter="addBuilding">立即提交</button>
                        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                    </div>
                </div>

        </form>

    </div>
    <div class="sysNotice col" style="margin-left: -40px ! important;">
        <!-- 地图 -->
        <div class="layui-elem-quote layui-quote-nm" id="allmap" style="width:50em;height:26em;border-left: 5.4px solid #18A890; ">
        </div>
        <div class="layui-form-item" style="position: absolute;left: 10.7em;top: 8.3em;" >
            <label class="layui-form-label">地址</label>
            <div class="layui-input-block" style="width: 25em;">
                <input type="text" class="layui-input newsName"  name="street" lay-verify="required" placeholder="郑州市二七区大学路98号">
            </div>
        </div>
    </div>
</div>
</body>

<script type="text/javascript" src="/pc/layui/layui.js"></script>
<script src="/pc/layout/js/jquery.min.js"></script>
<script type="text/javascript" src="/pc/building/js/create.js"></script>
<script src="/pc/building/js/map_new.js"></script>
<script type="text/javascript">
var text = document.getElementById("input");

text.onkeyup = function(){
// 将输入值为非数字的字符替换为空
this.value=this.value.replace(/-\D/g,'');

if(text.value>40 || text.value<1){

  text.value = "";

}

}
var text1 = document.getElementById("roo");

text1.onkeyup = function(){

this.value=this.value.replace(/-\D/g,'');

if(text1.value>20 || text1.value<1){

  text1.value = "";

}

}
</script>
</html>